package com.itheima.test03;
//定义一个教练类;他继承person类;
public  class Teacher extends person {
    //私有一个成员变量;
    private String id;
    //空参构造方法;
    public Teacher() {
    }
    //有参构造方法;
    public Teacher(String name, char sex, int age, String id) {
        super(name, sex, age);
        this.id = id;
    }
    //set,get方法;
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    //父类方法重写;
    @Override
    public void eat(){
        System.out.println("教练吃工作餐");
    }
}
